<?php

namespace app\command;

use think\console\Command;
use think\console\Input;
use think\console\Output;

class Index extends Command
{
    protected function configure()
    {
        // 指令配置
        $this->setName('index');
        // 设置参数
        $this->setDescription('index');
        $this->addArgument('type'); //必传参数
        
    }

    protected function execute(Input $input, Output $output)
    {

        $type = $input->getArgument('type');
        switch ($type) {
            case 'water':
                $this->_water();// php think xdata:Index water
                break;
            case 'voice':
                $this->_voice();// php think xdata:Index voice
                break;
            case 'clock':
                $this->_clock();// php think xdata:Index clock
                break;

        }

    }


    /**
     * 水吧 商品播报
     */
    protected function _water() {



        echo '_water';
    }


    /**
     * 语音大屏 项目播报
     */
    protected function _voice() {

        echo '_voice';
    }


    /**
     * 上钟播报
     */
    protected function _clock(){


        echo '_clock';
    }

}
